<template>
  <d2-container>
    <template slot="header">axios header</template>
    <div class="" v-for="(item,index) in list" :key="index">
      {{item.name}}
    </div>
    <template slot="footer">axios footer</template>
  </d2-container>
</template>

<script>
    export default {
      name: "page-axios",
      data() {
          return {
            list: []
          }
      },
      mounted() {
          this.getList();
      },
      methods: {
          getList() {
            this.$api.API_DEMO_AXIOS({
              type:1,
              show: 1
            })
              .then(res => {
                console.log(res)
                this.list = res
              })
              .catch(err => {
                console.log('err', err)
              })
          }
      }
    }
</script>

<style scoped>

</style>
